<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Maintain TravelPackages</title>
	<link rel="stylesheet" href="register.css" type="text/css" media="all"/>
</h:head>

<h:body style="background-image: url(images/templatemo_body.jpg) " >
	<p style="font-size: xx-large; font-family: Arial, Helvetica, sans-serif; color: #CC0000">MAINTAIN TRAVEL PACKAGES</p>
	<p:button outcome="employeeHome" value="BACK" icon="ui-icon-arrowreturnthick-1-w"/>
			
	<br />
	<div>
			
			<h:form id="form">  
			
			<p:growl id="messages" showDetail="true"/>  
		  
		    <p:dataTable var="travel" value="#{packageBean.getPredTPModel()}" id="travelList"> 
		  
		        <p:column headerText="ID" style="width:10%">  
		                    <h:outputText value="#{travel.travelID}" />  
		        </p:column> 
		        
		         <p:column headerText="Direction" style="width:20%">  
		                    <h:outputText value="#{travel.getMeanOfTransportation1().getTrip().toString()}" />  
		        </p:column>
		  
		        <p:column headerText="Hotel" style="width:20%">  
		                    <h:outputText value="#{travel.getHotelBean().getName()}" />  
		        </p:column> 
		         
		        <p:column headerText="Excursions" style="width:30%">  
	                  		<h:outputText value="#{travel.getExcursionsList()}" />  
		         </p:column>
		        
		        <p:column headerText="ToGo" style="width:20%">  
		            <h:outputText value="#{travel.getMeanOfTransportation1().getTransportationType().toString()}" />
		        </p:column>
		        
		        <p:column headerText="Return" style="width:20%">  
		            <h:outputText value="#{travel.getMeanOfTransportation2().getTransportationType().toString()}" />
		        </p:column>
		        
		        <p:column style="width:6%">  
               		<p:commandButton id="selectButton" actionListener="#{packageBean.deletePredTP(travel)}" icon="ui-icon-trash" title="View" type="update"  update=":form:messages :form:travelList"> 
     						<f:setPropertyActionListener value="#{travel}" target="#{packageBean.selectedTravel}" />  
           			</p:commandButton>   
        		</p:column> 
		  
		    </p:dataTable>  
		  
		</h:form>
			  </div>
</h:body>
</html>